/**
 * 
 */
package com.changil.nowonchangilchurch.protocol.dto;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * @author zeropol2
 *
 */
public class User extends BeanBase{
	public String id;
	public String name;
	public String joinDateTime;
	
	public User() {

	}

	public User(JSONObject rawData) {
		this();
		create(rawData);
	}
	
	@Override
	public void create(JSONObject data) {
		try{
			if ( !data.isNull("id")){
				id = data.getString("id");				
			}
			
			if( !data.isNull("name")) {
				name = data.getString("name");
			}
			
			if( !data.isNull("dateTime")) {
				joinDateTime = data.getString("dateTime");
			}
			
		} catch(JSONException e) {
			handleException(e);
		}
	}

	public String getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public String getJoinDateTime() {
		return joinDateTime;
	}
	
	
}
